-
Notifications
You must be signed in to change notification settings - Fork 154
docs: update environment variable tables for utilities #1153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: update environment variable tables for utilities #1153
Conversation
* Correct the default value for the POWERTOOLS_METRICS_NAMESPACE env var * Refer reader to utility page for further info on env vars
* Extract default and allowed values from description to their own cols * Add allowed values, example and default columns * Correct default value for metrics namespace
Previously the Metric and Tracer classes did not set a service name if one was not provided. There was no default service name. This commit sets a default service name in the Utility class, and updates the Tracer, Metric and Logger classes to use it.
Add missing `defaultServiceName` property to expected Logger object Correct typo in test names
Remove a test that is no longer valid. As there is a default service name, the tracer should not be enabled even if there is a service name Update the `addServiceAnnotation` function to remove redundant check
The `service_name` is now set by default. This means it is always present in metric dimensions. This commit updates the tests to account for this change
Add test for getDefaultServiceName method
Last remaining task is to extract the |
This commit extracts the isValidServiceName method from the Tracer class to the Utility class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @ConnorKirk thank you for the work here, it's looking great and I think we are really close to being able to merge it.
Left just a couple of comments, I think we need 1, maybe 2, more iterations and we're done!
Integration tests are passing: https://github.com/awslabs/aws-lambda-powertools-typescript/actions/runs/3470528039 Since @flochaz already approved the PR earlier, I'm going to merge this. |
Description of your changes
This PR updates the environment variable documentation for the main page, and three utilities.
It also sets the default service name to
service_undefined
. Previously, the Tracer and Metrics utilities did not set the service namedocs/index.md
isValidServiceName
to Utility classHow to verify this change
Related issues, RFCs
Issue number: #724
PR status
Is this ready for review?: Yes
Is it a breaking change?: No
Checklist
Breaking change checklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.